home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / Implementation / Storage / LinkDlgs.r < prev    next >
Encoding:
Text File  |  1997-02-13  |  9.8 KB  |  330 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        LinkDlgs.r
  3.  
  4.     Contains:    resources for data interchange dialogs
  5.  
  6.     Owned by:    Craig Carper
  7.  
  8.     Copyright:    © 1994 - 1996 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <5>      12/17/96    CC        1384387: Removed  'STR ' 523 & 524 and
  13.                                     'ppat' 506.
  14.          <4>     9/18/96    TJ        1384389 Remove RSRC names in Non-Debug
  15.                                     Builds.
  16.          <3>     9/10/96    eeh        1384356: remove dead code
  17.          <2>      6/7/96    eeh        T10017: move most stuff to LnkDlgEx.r
  18.         <19>    10/16/95    CC        GM 1293229: 'MENU' resources must be
  19.                                     nonpurgeable.
  20.                                     GM 1292157: Changed "No Kinds" to
  21.                                     "Unknown"; "None Available" to "None for
  22.                                     this Kind".
  23.         <18>     9/20/95    TÇ        1285201 GM: Use
  24.                                     alertPositionParentWindowScreen for dialogs
  25.         <17>     8/23/95    CC        1278840: Added kPasteAsEmbedEditorText
  26.                                     item.
  27.         <16>     7/28/95    CC        1242615: Made all resources purgeable.
  28.                                     1242576: Removed resources for Others
  29.                                     dialog.
  30.         <15>     4/27/95    CC        1243348: Removed BreakLinkAlert resources.
  31.         <14>     4/25/95    CC        1242555: Entered as bug 1242615 to check
  32.                                     for purgeable resources.
  33.                                     1242555: $5 entered as bug 1242617.
  34.         <13>     3/27/95    CC        1229640: Added items for editor popup and
  35.                                     static text.
  36.         <12>     3/17/95    CC        1220339: Changed title of Translation
  37.                                     Choices dialog.
  38.         <11>      3/9/95    CC        1220342: Tweeked layout of others dialog.
  39.         <10>      3/3/95    CC        1223861 Added link status and link edition
  40.                                     alert resources.
  41.          <9>     2/24/95    CC        1153783: Changed link edition filename
  42.                                     template string.
  43.          <8>     2/15/95    CC        1194705 Changed titles of link info dialogs
  44.                                     to "Link Destination Info" and "Link Source
  45.                                     Info".
  46.                                     1196831 Added strings for constructing size
  47.                                     of links.
  48.                                     1153942 Changed "Modified:" to "Updated:"
  49.                                     in Link Info dialogs
  50.                                     1220324 Removed static text items for
  51.                                     labeling radio buttons.
  52.                                     1191537 Revised Link Update alert
  53.                                     resources.
  54.                                     1220318 Data Interchange Dialogs need to
  55.                                     use 'finf' resource for localization
  56.                                     1191537 Need better wording in circular
  57.                                     link alert.
  58.                                     1220324 Added 'CNTL' resources for controls
  59.                                     that use window font.
  60.          <7>      2/7/95    CC        1211295: Added two items to PasteAs dialog:
  61.                                     kPasteAsKindLabel kPasteAsKindText.
  62.          <6>      2/1/95    CC        1153347: Added 'STR ' resource for
  63.                                     notification.
  64.          <5>     1/10/95    CC        1153930: Added translation choices to Paste
  65.                                     As dialog.
  66.          <4>     10/7/94    CC        1160232 - Changes to link update alerts.
  67.          <3>     9/20/94    CC        1160232 - Added resources for link cycle
  68.                                     Alert dialog.
  69.          <2>     7/31/94    CC        Initialize kind string of link destination
  70.                                     dialog to "(Unknown)".
  71.          <1>     6/24/94    CC        first checked in
  72.          <3>      6/3/94    CC        Fixed dctb resources.
  73.          <2>     3/17/94    CC        Added resources for ShowLinkSourceInfo()
  74.                                     and ShowLinkDestinationInfo(). (1151329)
  75.          <1>     3/14/94    CC        first checked in
  76.          <0>     3/14/94    CC        Resources for Paste As dialog (1144253).
  77.  
  78. */
  79. #define _USE_DIALOGS_LIB_
  80.  
  81. // Picture items are used for the merge and embed icons because 32x32 ICONs
  82. // don't work well.  The desired icon size is 19(high)x16(width).  If the
  83. // display item is the desired size, the ICON is scaled.  If the display item
  84. // is 32x32, the ICONs are drawn AFTER their radio buttons and can obscure them,
  85. // even though the radio buttons are later in the item sequence.
  86.  
  87. #define SystemSevenOrBetter 1            // we want the extended types
  88. #define    SystemSevenOrLater    1            // Types.r uses this variable
  89.  
  90. #define oldTemp        // Needed to use old-style 'dctb' resource
  91. #include "Types.r"
  92. #undef oldTemp        // End of 'dctb' fix
  93.  
  94. #include "SysTypes.r"
  95.  
  96. #include "LinkDefs.h"
  97.  
  98. #ifndef _USE_DIALOGS_LIB_
  99. // <eeh> removed old code
  100. #endif
  101.  
  102. //-------------------------------------------------------------------------------------
  103. // Link Update Alert
  104. //-------------------------------------------------------------------------------------
  105.  
  106. #define kLinkUpdateTextLines 5
  107. #define kLinkUpdateTextLineHeight 16
  108. #define kLinkUpdateTextHeight kLinkUpdateTextLines*kLinkUpdateTextLineHeight
  109. #define kLinkUpdateLeft 78
  110. #define kLinkUpdateTextWidth 245
  111. #define kLinkUpdateRight kLinkUpdateLeft+kLinkUpdateTextWidth
  112. #define kLinkUpdateBtnTop 13+kLinkUpdateTextHeight+13
  113. #define kLinkUpdateBtnBottom kLinkUpdateBtnTop+20
  114. #define kLinkUpdateBtnWidth 70
  115. #define kLinkUpdateContinueBtnLeft kLinkUpdateRight-kLinkUpdateBtnWidth
  116. #define kLinkUpdateStopBtnLeft kLinkUpdateRight-kLinkUpdateBtnWidth-13-kLinkUpdateBtnWidth
  117.  
  118. resource 'ALRT' (kLinkUpdateAlertID
  119. #If ODDebug
  120. , "Link Update"
  121. #endif
  122. , purgeable) {
  123.     {0, 0, kLinkUpdateBtnBottom+13, kLinkUpdateRight+13},
  124.     kLinkUpdateAlertID,
  125.     {    /* array: 4 elements */
  126.         /* [1] */
  127.         Ok, visible, sound1,
  128.         /* [2] */
  129.         Ok, visible, sound1,
  130.         /* [3] */
  131.         Ok, visible, sound1,
  132.         /* [4] */
  133.         Ok, visible, sound1
  134.     },
  135.     alertPositionParentWindowScreen
  136. };
  137.  
  138. resource 'DITL' (kLinkUpdateAlertID
  139. #If ODDebug
  140. , "Link Update"
  141. #endif
  142. , purgeable) {
  143.     {    /* array DITLarray: 4 elements */
  144.         /* [1] */
  145.         {kLinkUpdateBtnTop, kLinkUpdateContinueBtnLeft, kLinkUpdateBtnBottom, kLinkUpdateRight},
  146.         Button {
  147.             enabled,
  148.             "Update"
  149.         },
  150.         /* [2] */
  151.         {kLinkUpdateBtnTop, kLinkUpdateStopBtnLeft, kLinkUpdateBtnBottom, kLinkUpdateStopBtnLeft+kLinkUpdateBtnWidth},
  152.         Button {
  153.             enabled,
  154.             "Stop"
  155.         },
  156.         /* [3] */
  157.         {13, 23, 45, 55},
  158.         Icon {
  159.             disabled,
  160.             2
  161.         },
  162.         /* [4] */
  163.         {13, kLinkUpdateLeft, 13+kLinkUpdateTextHeight, kLinkUpdateRight},
  164.         StaticText {
  165.             disabled,
  166.             "Editing a link source has caused an update loop.\n"
  167.             "\n"
  168.             "Press Stop to interrupt updating, or press "
  169.             "Update to continue."
  170.         }
  171.     }
  172. };
  173.  
  174. //-------------------------------------------------------------------------------------
  175. // Link Status Alert
  176. //-------------------------------------------------------------------------------------
  177.  
  178. #define kLinkStatusTextLines 6
  179. #define kLinkStatusTextLineHeight 16
  180. #define kLinkStatusTextHeight kLinkStatusTextLines*kLinkStatusTextLineHeight
  181. #define kLinkStatusLeft 78
  182. #define kLinkStatusTextWidth 245
  183. #define kLinkStatusRight kLinkStatusLeft+kLinkStatusTextWidth
  184. #define kLinkStatusBtnTop 13+kLinkStatusTextHeight+13
  185. #define kLinkStatusBtnBottom kLinkStatusBtnTop+20
  186. #define kLinkStatusBtnWidth 70
  187. #define kLinkStatusOKBtnLeft kLinkStatusRight-kLinkStatusBtnWidth
  188.  
  189. resource 'ALRT' (kLinkStatusAlertID
  190. #If ODDebug
  191. , "Link Status"
  192. #endif
  193. , purgeable) {
  194.     {0, 0, kLinkStatusBtnBottom+13, kLinkStatusRight+13},
  195.     kLinkStatusAlertID,
  196.     {    /* array: 4 elements */
  197.         /* [1] */
  198.         Ok, visible, sound1,
  199.         /* [2] */
  200.         Ok, visible, sound1,
  201.         /* [3] */
  202.         Ok, visible, sound1,
  203.         /* [4] */
  204.         Ok, visible, sound1
  205.     },
  206.     alertPositionParentWindowScreen
  207. };
  208.  
  209. resource 'DITL' (kLinkStatusAlertID
  210. #If ODDebug
  211. , "Link Status"
  212. #endif
  213. , purgeable) {
  214.     {    /* array DITLarray: 3 elements */
  215.         /* [1] */
  216.         {kLinkStatusBtnTop, kLinkStatusOKBtnLeft, kLinkStatusBtnBottom, kLinkStatusRight},
  217.         Button {
  218.             enabled,
  219.             "OK"
  220.         },
  221.         /* [2] */
  222.         {13, 23, 45, 55},
  223.         Icon {
  224.             disabled,
  225.             2
  226.         },
  227.         /* [3] */
  228.         {13, kLinkStatusLeft, 13+kLinkStatusTextHeight, kLinkStatusRight},
  229.         StaticText {
  230.             disabled,
  231.             "The link information may not be accurate, "
  232.             "because a problem was encountered getting information about the "
  233.             "source of the link.\n"
  234.             "\n"
  235.             "(Error ^0)"
  236.         }
  237.     }
  238. };
  239.  
  240. //-------------------------------------------------------------------------------------
  241. // Missing Link Edition Alert
  242. //-------------------------------------------------------------------------------------
  243.  
  244. #define kLinkEditionTextLines 6
  245. #define kLinkEditionTextLineHeight 16
  246. #define kLinkEditionTextHeight kLinkEditionTextLines*kLinkEditionTextLineHeight
  247. #define kLinkEditionLeft 78
  248. #define kLinkEditionTextWidth 305
  249. #define kLinkEditionRight kLinkEditionLeft+kLinkEditionTextWidth
  250. #define kLinkEditionBtnTop 13+kLinkEditionTextHeight+13
  251. #define kLinkEditionBtnBottom kLinkEditionBtnTop+20
  252. #define kLinkEditionBtnWidth 70
  253. #define kLinkEditionOKBtnLeft kLinkEditionRight-kLinkEditionBtnWidth
  254.  
  255. resource 'ALRT' (kLinkEditionAlertID, "Link Edition", purgeable) {
  256.     {0, 0, kLinkEditionBtnBottom+13, kLinkEditionRight+13},
  257.     kLinkEditionAlertID,
  258.     {    /* array: 4 elements */
  259.         /* [1] */
  260.         Ok, visible, sound1,
  261.         /* [2] */
  262.         Ok, visible, sound1,
  263.         /* [3] */
  264.         Ok, visible, sound1,
  265.         /* [4] */
  266.         Ok, visible, sound1
  267.     },
  268.     alertPositionParentWindowScreen
  269. };
  270.  
  271. resource 'DITL' (kLinkEditionAlertID
  272. #If ODDebug
  273. , "Link Edition"
  274. #endif
  275. , purgeable) {
  276.     {    /* array DITLarray: 3 elements */
  277.         /* [1] */
  278.         {kLinkEditionBtnTop, kLinkEditionOKBtnLeft, kLinkEditionBtnBottom, kLinkEditionRight},
  279.         Button {
  280.             enabled,
  281.             "OK"
  282.         },
  283.         /* [2] */
  284.         {13, 23, 45, 55},
  285.         Icon {
  286.             disabled,
  287.             2
  288.         },
  289.         /* [3] */
  290.         {13, kLinkEditionLeft, 13+kLinkEditionTextHeight, kLinkEditionRight},
  291.         StaticText {
  292.             disabled,
  293.             "The source of this link could not be found.\n"
  294.             "\n"
  295.             "If you have not broken the link at the source, you may be able to "
  296.             "get a more recent update by opening the document containing "
  297.             "the source of this link."
  298.         }
  299.     }
  300. };
  301.  
  302. #if 0
  303. // Apparently not used [cc]
  304. //-------------------------------------------------------------------------------------
  305. // Color pattern used by link dialogs
  306. //-------------------------------------------------------------------------------------
  307.  
  308. data 'ppat' (kLinkDlgsppatID, purgeable) {
  309.     $"0001 0000 001C 0000 004E 0000 0000 FFFF"
  310.     $"0000 0000 AA55 AA55 AA55 AA55 0000 0000"
  311.     $"8001 0000 0000 0008 0008 0000 0000 0000"
  312.     $"0000 0048 0000 0048 0000 0000 0001 0001"
  313.     $"0001 0000 0000 0000 0056 0000 0000 55AA"
  314.     $"55AA 55AA 55AA 0000 0000 0000 0001 0000"
  315.     $"7777 7777 7777 0001 8888 8888 8888"
  316. };
  317. #endif
  318.  
  319. //-------------------------------------------------------------------------------------
  320. // Strings used by the Link Manager
  321. //-------------------------------------------------------------------------------------
  322.  
  323. resource 'STR ' (kODLinkMgrCannotShowSourceID, purgeable) {
  324.     "Cannot show source of link (error ^0)."
  325. };
  326.  
  327. resource 'STR ' (kODLinkMgrEditionTemplateID, purgeable) {
  328.     "^0 Link ^1"
  329. };
  330.